package com.lagou.bean;

import com.lagou.service.HelloService;
import com.lagou.service.HomeworkService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Component;

/**
 * 消费者组件
 */
@Component
public class ConsumerComponet {

    //引用dubbo主键
    @Reference
    private HelloService helloService;

    public String sayHello(String name){
        return helloService.sayHello(name);
    }

    @Reference
    private HomeworkService homeworkService;

    public String methodA() throws InterruptedException {
        return homeworkService.methodA();
    }

    public String methodB() throws InterruptedException {
        return homeworkService.methodB();
    }

    public String methodC() throws InterruptedException {
        return homeworkService.methodC();
    }
}
